package com.hhit.bigscreenbackmanage.controller.aqgl;

import com.hhit.bigscreenbackmanage.common.Response;
import com.hhit.bigscreenbackmanage.service.aqgl.*;
import com.hhit.bigscreenbackmanage.vo.aqgl.AqglSearchVo;
import org.checkerframework.checker.units.qual.A;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName AqglSearchController
 * @Description
 * @Author qianchengcheng
 * @Date 2021/7/22
 */
@RequestMapping("/aqgl")
@RestController
public class AqglSearchController {

    private static Logger log = LoggerFactory.getLogger(AqglSearchController.class);

    @Autowired
    private AqglFxCountService aqglFxCountService;

    @Autowired
    private AqglFxService aqglFxService;

    @Autowired
    private AqglRbService aqglRbService;

    @Autowired
    private AqglKqrsService aqglKqrsService;

    @Autowired
    private AqglKqrsDxgcService aqglKqrsDxgcService;

    @Autowired
    private AqglRybzService aqglRybzService;

    @Autowired
    private AqglZypTjService aqglZypTjService;

    @Autowired
    private AqglZypXqService aqglZypXqService;

    @Autowired
    private AqglDrrygkTempService aqglDrrygkTempService;

    @Autowired
    private AqglDailyPaperTempService aqglDailyPaperTempService;

    @Autowired
    private AqglJdjcqkService aqglJdjcqkService;

    @Autowired
    private AqglMrboService aqglMrboService;

    @Autowired
    private AqglJdjcqkSblzService aqglJdjcqkSblzService;

    @Autowired
    private AqglJdjcqkYcjcService aqglJdjcqkYcjcService;

    @PostMapping("/getSearchInfo")
    public Response getSearchInfo(@RequestBody AqglSearchVo aqglSearchVo){
        try {
            if ("aqglFxzysltjColumnName".equals(aqglSearchVo.getPropName())){
                return Response.createResponseBySuccess("查询成功",aqglFxCountService.getAqglFxCountPageInfo(aqglSearchVo));
            }
            if ("aqglFxtjxqColumnName".equals(aqglSearchVo.getPropName())){
                return Response.createResponseBySuccess("查询成功",aqglFxService.getAqglFxPageInfo(aqglSearchVo));
            }
            if ("aqglRbColumnName".equals(aqglSearchVo.getPropName())){
                return Response.createResponseBySuccess("查询成功",aqglRbService.getAqglRbPageInfo(aqglSearchVo));
            }
            if ("aqglKqrsColumnName".equals(aqglSearchVo.getPropName())){
                return Response.createResponseBySuccess("查询成功",aqglKqrsService.getAqglKqrsPageInfo(aqglSearchVo));
            }
            if ("aqglDxgcKqrsColumnName".equals(aqglSearchVo.getPropName())){
                return Response.createResponseBySuccess("查询成功",aqglKqrsDxgcService.getAqglKqrsDxgcPageInfo(aqglSearchVo));
            }
            if ("aqglRybzColumnName".equals(aqglSearchVo.getPropName())){
                return Response.createResponseBySuccess("查询成功",aqglRybzService.getAqglRybzPageInfo(aqglSearchVo));
            }
            if ("aqglZypsltjColumnName".equals(aqglSearchVo.getPropName())){
                return Response.createResponseBySuccess("查询成功",aqglZypTjService.getAqglZypTjPageInfo(aqglSearchVo));
            }
            if ("aqglZyptjxqColumnName".equals(aqglSearchVo.getPropName())){
                return Response.createResponseBySuccess("查询成功",aqglZypXqService.getAqglZypXqPageInfo(aqglSearchVo));
            }
            if ("aqglDrrygkColumnName".equals(aqglSearchVo.getPropName())){
                return Response.createResponseBySuccess("查询成功",aqglDrrygkTempService.getAqglDrrygkTempPageInfo(aqglSearchVo));
            }
            if ("aqglDailyPaperColumnName".equals(aqglSearchVo.getPropName())){
                return Response.createResponseBySuccess("查询成功",aqglDailyPaperTempService.getAqglDailyPaperTempPageInfo(aqglSearchVo));
            }
            if ("aqglJdjcqkColumnName".equals(aqglSearchVo.getPropName())){
                return Response.createResponseBySuccess("查询成功",aqglJdjcqkService.getAqglJdjcqkPageInfo(aqglSearchVo));
            }
            if ("aqglMrboColumnName".equals(aqglSearchVo.getPropName())){
                return Response.createResponseBySuccess("查询成功",aqglMrboService.geTAqglMrboPageInfo(aqglSearchVo));
            }
            if ("aqglJdjcqkSblzColumnName".equals(aqglSearchVo.getPropName())){
                return Response.createResponseBySuccess("查询成功",aqglJdjcqkSblzService.getAqglJdjcqkSblzPageInfo(aqglSearchVo));
            }
            if ("aqglJdjcqkYcjcColumnName".equals(aqglSearchVo.getPropName())){
                return Response.createResponseBySuccess("查询成功",aqglJdjcqkYcjcService.getAqglJdjcqkYcjcPageInfo(aqglSearchVo));
            }
            return Response.createResponseByError("查询失败");
        }catch (Exception e){
            log.error("AqglSearchController.getSearchInfo Call Error",e);
            return Response.createResponseByError("查询异常");
        }
    }
}
